package com.okami.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: TanJingyu
 * @create: 2021-02-04 16:38
 **/
@Configuration
public class PropertiesConfig {
    @Bean
    @ConfigurationProperties(prefix = "tan.tan")
    public Demo demo() {
        return new Demo();
    }


    public static class Demo {
        String userName;

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }
    }
}
